<template>
	<view>
		<view class="listbox">
			<view class="listview flex ac">
				<view class="listtext" style="flex: 1;">当前版本</view>
				<view class="listtext">V1.0.0</view>
			</view>
			<view class="listview flex ac" @click="tuichu">
				<view class="listtext" style="flex: 1;">退出账户</view>
				<image style="width: 30rpx;height: 30rpx;" src="../../static/icon/right.png"></image>
			</view>
		</view>
		<view class="listbox">
			<view class="listview flex ac">
				<view class="listtext" style="flex: 1;">用户协议</view>
				<image style="width: 30rpx;height: 30rpx;" src="../../static/icon/right.png"></image>
			</view>
			<view class="listview flex ac">
				<view class="listtext" style="flex: 1;">隐私政策</view>
				<image style="width: 30rpx;height: 30rpx;" src="../../static/icon/right.png"></image>
			</view>
		</view>
		<view class="listbox">
			<view class="listviewa flex ac">
				<view class="listtext" style="flex: 1;">飘屏开关</view>
				<switch style="transform: scale(0.7,0.7)"></switch>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			tuichu(e) {
				uni.showModal({
					title: '温馨提示',
					content: '确定要退出当前账户？',
					success: function(res) {
						if (res.confirm) {
							getApp().globalData.token = '' //保存token
							uni.setStorageSync('token', getApp().globalData.token)
							uni.reLaunch({
								url: "/pages/home/home"
							});
						}
					}
				})

			},
		}
	}
</script>

<style lang="scss" scoped>
	page {
		padding: 0 20rpx;
		background-color: #F2F1F5;
	}

	.listbox {
		background-color: #ffffff;
		padding: 20rpx 20rpx;
		margin-top: 20rpx;
		border-radius: 30rpx;
	}

	.listview {
		padding: 26rpx 0;
		border-bottom: 1px solid #EAEAEA;
	}

	.listviewa {
		padding: 10rpx 0;
	}

	.listview:last-child {
		border-bottom: none;
	}

	.listtext {
		font-size: 29rpx;
		color: #161723;
	}
</style>